<script setup lang="ts">
import { useMemberStore } from '@/stores'
import {http } from '@/utils/http'
const memberStore = useMemberStore()
const getData = () => {
  http({
    url: '/home/banner1111',
    data: {},
    header: {
      Accept: 'application/json',
      'Content-Type': 'application/json',
      'X-Requested-With': 'XMLHttpRequest'
    },
    method: 'GET',
    sslVerify: true,
    success: ({ data, statusCode, header }) => {},
    fail: (error) => {}
  })
}
</script>

<template>
  <view class="my">
    <view>会员信息：{{ memberStore.profile }}</view>
    <button @tap="
      memberStore.setProfile({
        nickname: '黑马先锋',
        token:'222'
      })
      " size="mini" plain type="primary">
      保存用户信息
    </button>
    <button @tap="memberStore.clearProfile()" size="mini" plain type="warn">清理用户信息</button>
    <button @tap="getData()" size="mini" plain type="warn">清理用户信息</button>
  </view>
</template>

<style lang="scss"></style>
